<%--
  Created by IntelliJ IDEA.
  User: 28797
  Date: 2022/10/21
  Time: 11:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>订单明细</title>
    <link rel="stylesheet" href="../css/myOrder_submit.css">
    <link rel="stylesheet" href="../css/head_daohang.css">

    <link rel="stylesheet" href="../layui/css/layui.css">
    <script src="../js/jquery-3.6.0.min.js"></script>
    <script src="../layui/layui.js"></script>
</head>
<body>
<!-- 公用头部 -->
<div id="head">
    <div class="layui-col-md2">
        <div class="grid-demo ">
            <div class="head-logo"></div>
        </div>
    </div>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo"><a href="${pageContext.request.contextPath}/index.jsp" class="word-1">首页</a></div>
    </div>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo"><a href="${pageContext.request.contextPath}/car/getCarView" class="head-hover word-1">自驾租车</a>
        </div>
    </div>
    <%--    <div class="layui-col-md1">--%>
    <%--        <div class="grid-demo head-demo"><a href="${pageContext.request.contextPath}/long_time_older/long_time.jsp" class="head-hover word-1">长租专区</a>--%>
    <%--        </div>--%>
    <%--    </div>--%>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo"><a href=" ${pageContext.request.contextPath}/carOutlets/carAllList" class="head-hover word-1">车型查询</a>
        </div>
    </div>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo"><a href="${pageContext.request.contextPath}/Offline_outlets/Business_outlets.jsp" class="head-hover word-1">营业网点</a></div>
    </div>
    <%--    <div class="layui-col-md1">--%>
    <%--        <div class="grid-demo head-demo"><a href="" class="head-hover word-1">会员专区</a></div>--%>
    <%--    </div>--%>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo1">
            <i class="login-icon"></i>
            <a href="${pageContext.request.contextPath}/login/login.jsp" class="head-color">登录/注册</a>
        </div>
        <div class="tel">
            <i class="tel-icon"></i>
            <span class="tel-num">110-119-1111</span>
        </div>
    </div>
</div>

<!-- 订单进程条 -->
<div class="step2-progress-box">
    <div class="progress-percent"></div>
    <div class="progress-icon">
        <span class="progress-firsticon">1</span>
        <span class="progress-secondicon">2</span>
        <span class="progress-thirdicon">3</span>
    </div>
    <div class="progress-text">
        <span class="progress-firsttext">挑选车型</span>
        <span class="progress-secondtext">填写与核对订单</span>
        <span class="progress-thirdtext">成功提交</span>
    </div>
</div>

<!-- 订单详情 -->
<div class="step2-wrap">
    <div class="step2-box">
        <div class="step2-box-left">
            <div class="order-info-box">
                <div class="car-image-box">
                    <img src="${pageContext.request.contextPath}/${car.other1}" alt="本田缤智">
                    <span>租 期：<em>1</em>天</span>
                    <div class="" id="longmonthtips">
                    </div>
                </div>

                <div class="store-info-box">
                    <div class="car-name">
                        <a class="revise-back" href="javascript:void(0);" target="_self" title="返回修改">返回修改</a>
                        ${car.carName}<a class="car-info" href="javascript:void(0);" id="cartypedetail">车辆详情&gt;</a>
                    </div>

                    <ul>
                        <li><span class="store-title">取车地点</span><span class="store-title">还车地点</span></li>
                        <li><span>取车门店：${businessOutlet.getOutletsName()}</span><span>还车门店：${businessOutlet.getOutletsName()}</span></li>
                        <li><span>取车时间：2023-12-21 12:00:00</span><span>还车时间：2023-12-22 12:00:00</span></li>
                        <li><span>取车地址：${businessOutlet.getOutlesLocal()}</span><span>还车地址：${businessOutlet.getOutlesLocal()}</span></li>
                        <li style="padding-top: 5px;"><span class="store-title">订单说明：</span></li>
                        <li class="rule-toggle">不限公里数，超时费按车辆租赁费及门店服务费均价÷6收取实际超期小时费 (部分0元活动订单，按照40元/小时进行收取)。<a href="javascript:void(0);" id="gz">退改规则</a></li>
                        <li style="color: red;">温馨提示：<a href="javascript:void(0);" title="限行城市规则" style="color: red;" target="_blank">点击阅读限行城市规则</a></li>
                    </ul>
                </div>
            </div>

            <!-- 优惠活动 -->
            <div class="activity-box">
                <div class="title">优惠活动</div>
                <div class="activity-list" id="selpromotion">
                    <ul>
                        <li id="promotioncodeli">
                            <input type="radio" class="ck-discount-code ba-analysis" name="promotion" id="PromotionCode" data-ba-action="使用优惠码">
                            使用优惠码
                            <i>注：使用您获得的优惠编码</i>
                            <div class="activity-load hidelable"></div>
                            <div class="discount-box clear_float" id="promotioncodediv" >

                                <%--                                <div class="discountcode-box">--%>
                                <%--                                    <div class="discountcode-intro discountcode-usable" id="" title="一嗨新用户首单立减100元">--%>
                                <%--                                        <div class="discountcode-info">--%>
                                <%--                                            <div class="discountcode-price"><em>￥</em><span class="yhFree">100</span></div>--%>
                                <%--                                            <div class="discountcode-validity">有效期至2022/11/23 23:59:59</div>--%>
                                <%--                                        </div>--%>
                                <%--                                        <div class="discountcode-title">--%>
                                <%--                                            一嗨新用户首单立减100元--%>
                                <%--                                        </div>--%>
                                <%--                                    </div>--%>
                                <%--                                </div>--%>
                                <%--                                <div class="discountcode-box">--%>
                                <%--                                    <div class="discountcode-intro discountcode-usable" id="" title="车型试驾50元优惠券">--%>
                                <%--                                        <div class="discountcode-info">--%>
                                <%--                                            <div class="discountcode-price"><em>￥</em><span class="yhFree">50</span></div>--%>
                                <%--                                            <div class="discountcode-validity">有效期至2022/9/4 23:59:59</div>--%>
                                <%--                                        </div>--%>
                                <%--                                        <div class="discountcode-title">--%>
                                <%--                                            车型试驾50元优惠券--%>
                                <%--                                        </div>--%>
                                <%--                                    </div>--%>
                                <%--                                </div>--%>
                                <%--                                <div class="discountcode-box">--%>
                                <%--                                    <div class="discountcode-intro discountcode-disable" id="" title="200元优惠券-1088礼包">--%>
                                <%--                                        <div class="discountcode-info">--%>
                                <%--                                            <div class="discountcode-price">1<em>天</em></div>--%>
                                <%--                                            <div class="discountcode-validity">有效期至2022/10/24 23:59:59</div>--%>
                                <%--                                        </div>--%>
                                <%--                                        <div class="discountcode-title">--%>
                                <%--                                            200元优惠券-1088礼包--%>
                                <%--                                        </div>--%>
                                <%--                                    </div>--%>
                                <%--                                    <div class="discountcode-result">--%>
                                <%--                                        新用户不可用--%>
                                <%--                                    </div>--%>
                                <%--                                </div>--%>
                                <%--                                <div class="discountcode-box endbox">--%>
                                <%--                                    <div class="discountcode-intro discountcode-disable" id="" title="满800减88元优惠券-1088礼包">--%>
                                <%--                                        <div class="discountcode-info">--%>
                                <%--                                            <div class="discountcode-price"><em>￥</em>88</div>--%>
                                <%--                                            <div class="discountcode-validity">有效期至2023/2/21 23:59:59</div>--%>
                                <%--                                        </div>--%>
                                <%--                                        <div class="discountcode-title">--%>
                                <%--                                            满800减88元优惠券-1088礼包--%>
                                <%--                                        </div>--%>
                                <%--                                    </div>--%>
                                <%--                                    <div class="discountcode-result">--%>
                                <%--                                        订单总价不满足--%>
                                <%--                                    </div>--%>
                                <%--                                </div>--%>

                            </div>
                        </li>
                        <li id="promotionli">
                            <input name="promotion" type="radio" id="promotions" class="ck-ehi-act ba-analysis" data-ba-action="一嗨会员专享优惠">一嗨会员专享优惠
                            <div class="activity-load hidelable"></div>
                            <div class="corperate-box" id="promotionsdiv" >
                                <span class="activity-none">暂无可用优惠</span>
                            </div>
                        </li>
                        <li>
                            <input name="promotion" type="radio" id="999" class="ba-analysis" checked data-ba-action="不参加以上任何活动">不参加以上任何活动
                        </li>
                    </ul>
                </div>
            </div>

            <!-- 其它服务 -->
            <div class="service-box">
                <div class="title">
                    其它服务
                    <a href="javascript:void(0);">基本保障服务说明</a>
                </div>
                <div class="service-list">
                    <ul id="addedlist">
                        <li class="j-insurance-added" id="ViolationInsurance">
                            <div class="service-table">
                                <div class="cell service-input">
                                    <input type="checkbox" id="fw1" value="行无忧" name="fwName" onclick="checkedThis(this)" class="ba-analysis fw" data-ba-action="行无忧">
                                </div>
                                <div class="cell service-name">
                                    行无忧
                                    <div class="service-name-intro">

                                    </div>
                                </div>
                                <div class="cell service-single-price">27 * 2</div>
                                <div class="cell service-price">
                                    <i>￥</i>
                                    <span>54</span>
                                </div>
                            </div>
                        </li>
                        <li class="j-insurance-added" id="BasicGuarantee">
                            <div class="service-table">
                                <div class="cell service-input">
                                    <input type="checkbox" id="fw2" class="ba-analysis fw" name="fwName" onclick="checkedThis(this)" value="优享补充保障" data-ba-action="优享补充保障">
                                </div>
                                <div class="cell service-name">
                                    优享补充保障
                                    <div class="service-name-intro"></div>
                                    <div class="service-name-tips">
                                        增强三者保障至30万+5000元以下车损免赔
                                    </div>
                                    <div class="service-name-tag">
                                        <span class="tag-one">购买立享行无忧8折</span>
                                        <span class="tag-two">限时特惠</span>
                                    </div>
                                </div>
                                <div class="cell service-single-price">53 * 2</div>
                                <div class="cell service-price">
                                    <em>￥</em><span>105</span>
                                    <div class="original-price">
                                        原价
                                        <span>￥110</span>
                                    </div>
                                </div>
                            </div>
                        </li>
                        <li class="j-insurance-added" id="AdvancedGuarantee">
                            <div class="service-table">
                                <div class="cell service-input">
                                    <input type="checkbox" id="fw3" class="ba-analysis fw" name="fwName" onclick="checkedThis(this)" value="尊享补充保障" data-ba-action="尊享补充保障">
                                </div>
                                <div class="cell service-name">
                                    尊享补充保障
                                    <div class="service-name-intro"></div>
                                    <div class="service-name-tips">
                                        增强三者保障至70万+5000元以下车损免赔
                                    </div>
                                    <div class="service-name-tag">
                                        <span class="tag-one">购买立享行无忧8折</span>
                                        <span class="tag-two">限时特惠</span>
                                    </div>
                                </div>
                                <div class="cell service-single-price">72 * 2</div>
                                <div class="cell service-price">
                                    <em>￥</em><span>144</span>
                                    <div class="original-price">
                                        原价
                                        <span>￥160</span>
                                    </div>
                                </div>
                            </div>
                        </li>
                        <!--                            <li class="j-insurance-added" id="PrivilegeGuarantee">-->
                        <!--                                <div class="service-table">-->
                        <!--                                    <div class="cell service-input">-->
                        <!--                                        <input type="checkbox" id="fw4" class="ba-analysis fw" name="fwName" onclick="checkedThis(this)" value="百万补充保障" data-ba-action="百万补充保障">-->
                        <!--                                    </div>-->
                        <!--                                    <div class="cell service-name">-->
                        <!--                                        百万补充保障-->
                        <!--                                        <div class="service-name-intro"></div>-->
                        <!--                                        <div class="service-name-tips">-->
                        <!--                                            增强三者保障至120万+5000元以下车损免赔-->
                        <!--                                        </div>-->
                        <!--                                        <div class="service-name-tag">-->
                        <!--                                            <span class="tag-one">购买立享行无忧5折</span>-->
                        <!--                                            <span class="tag-two">限时特惠</span>-->
                        <!--                                        </div>-->
                        <!--                                    </div>-->
                        <!--                                    <div class="cell service-single-price">95 * 2</div>-->
                        <!--                                    <div class="cell service-price">-->
                        <!--                                        <em>￥</em><span>189</span>-->
                        <!--                                        <div class="original-price">-->
                        <!--                                            原价-->
                        <!--                                            <span>￥210</span>-->
                        <!--                                        </div>-->
                        <!--                                    </div>-->
                        <!--                                </div>-->
                        <!--                            </li>-->
                        <!--                            <li>-->
                        <!--                                <div class="service-table">-->
                        <!--                                    <div class="cell service-input">-->
                        <!--                                        <input type="checkbox" id="fw5" class="ba-analysis fw" name="fwName" onclick="checkedThis(this)" value="免除代加油服务费" data-ba-action="免除代加油服务费">-->
                        <!--                                    </div>-->
                        <!--                                    <div class="cell service-name">-->
                        <!--                                        免除代加油服务费-->
                        <!--                                        <div class="service-name-intro"></div>-->
                        <!--                                        <div class="service-name-tag">-->
                        <!--                                            <span class="tag-two">限时特惠</span>-->
                        <!--                                        </div>-->
                        <!--                                    </div>-->
                        <!--                                    <div class="cell service-single-price"></div>-->
                        <!--                                    <div class="cell service-price">-->
                        <!--                                        <span>￥</span><span>144</span>-->
                        <!--                                        <div class="original-price">-->
                        <!--                                            <span></span>-->
                        <!--                                        </div>-->
                        <!--                                    </div>-->
                        <!--                                </div>-->
                        <!--                            </li>-->

                    </ul>
                </div>
            </div>

            <!-- 发票信息 -->
            <!--                <div class="invoice-box" id="invoiceList">-->
            <!--                    <div class="title">发票信息</div>-->
            <!--                    <div class="invoice-prompt">-->
            <!--                        <p>-->
            <!--                            1、代金券仅支持开增值税普通发票，开票金额以实际购买金额为准；使用代金券支付的金额不可再开具发票。-->
            <!--                            <br>-->
            <!--                            2、自2017年1月1日起推行增值税电子普通发票，具体内容见官网帮助中心-网上预订- -->
            <!--                            <a href="https://www.1hai.cn/NewHelp/HelpContent?menuId=22&amp;isLimitRules=False#dzfp-txzzsfp" target="_blank">关于推行增值税电子普通发票的公告</a>-->
            <!--                            <br>-->
            <!--                            3、自2017年7月1日起，购买方为政企的，索取增值税普通发票（或增值税电子发票）时，应向销售方提供纳税人识别号或统一社会信用代码，具体内容见官网帮助中心-网上预订- -->
            <!--                            <a href="https://www.1hai.cn/NewHelp/HelpContent?menuId=22&amp;isLimitRules=False#dzfp-kjzzsfp" target="_blank">关于增值税发票开具有关问题的公告</a>-->
            <!--                        </p>-->
            <!--                    </div>-->
            <!--                    <div class="invoice-list">-->
            <!--                        <div class="invoice-head">-->
            <!--                            <input type="checkbox" name="IsCheckedInvoice" id="chkInv" class="need-invoice ba-analysis" data-inv="0" data-invoicetype="ElectronicInvoice">-->
            <!--                            <label for="chkInv">需要发票</label>-->
            <!--                            <span>（从订单完成日起30天之内发票需求有效）</span>-->
            <!--                        </div>-->
            <!--                        <div class="invoice-info">-->
            <!--                            <div class="invoice-type">-->
            <!--                                <h4>发票类型</h4>-->
            <!--                                <span class="active" data-invoicetype="EletronicInvoice">电子发票</span>-->
            <!--                            </div>-->
            <!--                            <div class="invoice-title">-->
            <!--                                <h4>-->
            <!--                                    发票抬头-->
            <!--                                    <a class="invoice-add" href="#" target="_blank">常用发票抬头管理</a>-->
            <!--                                </h4>-->
            <!--                                <table class="invoice-table">-->
            <!--                                    <thead>-->
            <!--                                        <tr>-->
            <!--                                            <td width="42"></td>-->
            <!--                                            <td width="160">抬头类型</td>-->
            <!--                                            <td width="260">抬头名称</td>-->
            <!--                                            <td>税号</td>-->
            <!--                                        </tr>-->
            <!--                                    </thead>-->
            <!--                                    <tbody>-->
            <!--                                        <tr>-->
            <!--                                            <td></td>-->
            <!--                                            <td></td>-->
            <!--                                            <td title=""></td>-->
            <!--                                            <td>(订单发票)</td>-->
            <!--                                        </tr>-->
            <!--                                    </tbody>-->
            <!--                                </table>-->
            <!--                            </div>-->
            <!--                            <div class="invoice-send">-->
            <!--                                <ul>-->
            <!--                                    <li>-->
            <!--                                        <p>电子邮箱</p><input placeholder="请输入你的邮箱号" maxlength="50" id="invoiceEmail" value="">-->
            <!--                                    </li>-->
            <!--                                    <li>-->
            <!--                                        <p>手机号码</p><input placeholder="请输入你的手机号码" maxlength="15" id="invoicePhoneNumber" value="">-->
            <!--                                    </li>-->
            <!--                                </ul>-->
            <!--                            </div>-->
            <!--                        </div>-->
            <!--                    </div>-->
            <!--                </div>-->

            <!-- 备注信息 -->
            <%--            <div class="remark-box">--%>
            <%--                <div class="title">备注信息</div>--%>
            <%--                <div class="remark-list">--%>
            <%--                    <div class="remark-head">--%>
            <%--                        <input class="need-remark ba-analysis" id="chkRemark" data-ba-action="添加备注" name="IsCheckedRemark" type="checkbox"><label for="chkRemark">添加备注</label>--%>
            <%--                    </div>--%>
            <%--                    <div class="remark-info">--%>
            <%--                        <textarea class="remark-txt" id="remark" name="" maxlength="50"></textarea>--%>
            <%--                    </div>--%>
            <%--                </div>--%>
            <%--            </div>--%>
        </div>

        <!-- 右边内容 -->
        <div class="step2-box-right" id="priceall">
            <form name="formname" action="" method="post"></form>
            <div class="price-detail">
                <div class="title">
                    费用明细
                </div>
                <ul>
                    <li class="line-clear" id="baseRatePrice">
                        <em class="price-drop">
                            ￥<span>${car.carPrice}</span><i class="price-drop-open"></i><i class="price-drop-close"></i>
                        </em>车辆租赁费及门店服务费
                        <span>现付价</span>
                        <%--                        <div class="price-drop-box" id="baseRateDetail">--%>
                        <%--                                    <span>--%>
                        <%--                                        <p>--%>
                        <%--                                            08/27 周六--%>
                        <%--                                        </p>--%>
                        <%--                                        <p class="orange">--%>
                        <%--                                            ￥275--%>
                        <%--                                        </p>--%>
                        <%--                                    </span>--%>
                        <%--                            <span>--%>
                        <%--                                        <p>--%>
                        <%--                                            08/28 周日--%>
                        <%--                                        </p>--%>
                        <%--                                        <p class="orange">--%>
                        <%--                                            ￥275--%>
                        <%--                                        </p>--%>
                        <%--                                    </span>--%>
                        <%--                        </div>--%>
                    </li>
                    <!--基本保障服务费-->
                    <li>
                        <em class="price-mid ">￥<span>100</span></em>基本保障服务费
                        <span></span>
                        <span style="color:#666">基本保障服务费50元 * 2天</span>
                    </li>

                    <li id="servicePriceList">
                        <em class="price-drop">
                            ￥<span>20</span>
                            <i class="price-drop-open"></i><i class="price-drop-close"></i>
                        </em>其它服务费
                        <%--                        <div class="price-drop-box" id="serviceList">--%>
                        <%--                                <span>--%>
                        <%--                                    <p class="orange">--%>
                        <%--                                        <em>￥</em><span>20</span>--%>
                        <%--                                    </p>--%>
                        <%--                                    <p>--%>
                        <%--                                        手续费--%>
                        <%--                                    </p>--%>
                        <%--                                </span>--%>
                        <%--                        </div>--%>
                    </li>
                    <li id="promotionPriceList" class="hidelable">
                    </li>
                </ul>
                <div class="deposit_box">
                    <p>车辆保证金<em>（可退）</em><span>￥4000</span></p>
                    <p>违章押金<em>（可退）</em><span>￥2000</span></p>
                </div>

                <form method="post" action="${pageContext.request.contextPath}/orders/myorder">
                    <input type="hidden" name="carId" value="${car.carId}">
                    <input type="hidden" name="outletsId" value="${businessOutlet.outletsId}">
                    <input type="hidden" name="carPrice" value="${car.carPrice}">
                    <input type="hidden" class="couponFree" name="couponFree" value="0">
                    <input type="hidden" class="couponChecked" name="couponNo" value="">
                    <input type="hidden" class="fwPrice" name="fwPrice" value="0">
                    <input type="hidden" class="orderCustId" name="custId" value="">

                    <div class="price-box" id="totalAmount">
                        <span class="sub-load hidelable" id="priceloading"></span>
                        <span class="price-txt" id="priceTitle">总计:</span><span class="price-total" id="priceTotal"><em>￥</em><span class="sum_price">${car.carPrice}</span></span>
                    </div>
                    <div class="price-btnbox">
                        <%--                    <a href="${pageContext.request.contextPath}/myOrder/myOrder_confirm.jsp">--%>
                        <input type="submit" value="提交订单" class="btnSubmit">
                        <%--                    </a>--%>
                        <%--                    <span class="sub-load hidelable" id="loading" style="color: #eb5b00"></span>--%>
                    </div>
                </form>

                <div class="price-help">

                    <p style="display:none; border-bottom: 1px dashed #EB5A01; padding-bottom: 5px; margin-bottom: 5px;"><b>此单可参加周年庆返现活动，您需支付整单金额，返还金额（基本租车费的50%）将在还车后3-5个工作日退还至您的一卡行账户</b></p>

                    首次租车请使用本人信用卡，本人二代有效身份证，本人有效地方驾驶证正副本。<br>

                    <p>本订单仅为客户租车预约登记，提交该订单后，客户需要到门店办理具体租车手续，具体权利义务以签署的合同为准。</p>
                </div>
                <div id="LimitRemind" style="border-top:1px solid #ccc; color: #EB5A01; background: #FFFCD2; padding: 15px; line-height:20px;display:none;"></div>
            </div>
        </div>
    </div>
</div>

<!-- 尾部 -->
<div class="footer">
    <div class="footer-box">
        <div class="footer-left">
            <p>
                <span>关于无忧</span> |
                <span>移动客户端</span> |
                <span>帮助中心</span> |
                <span>建议专区</span> |
                <span>联系我们</span> |
                <span>友情连接</span> |
                <span>投诉通道：400-821-1608</span>
            </p>
            <p>
                <span>Copyright © 2007-2022 苏州无忧信息技术服务有限公司 ICP证：苏B2-20140130|苏ICP备08010394号-1</span>
            </p>
        </div>
        <div class="footer-right"></div>
    </div>
</div>

<!-- 车辆详情 -->
<div class="myshowbox">
    <div class="car_detail">
        <div>
            <div class="detail_title">
                <span>本田缤智</span>
            </div>
            <a class="btn_close" href="#">
                <span></span>
            </a>
        </div>
        <div class="current-carinfo">
            <div class="current-carpic">
                <img src="../images/本田缤智.png">
                <span class="car_name">本田缤智</span>
            </div>

            <ul>
                <li>
                        <span>
                            <img src="../images/变速箱.png">
                        </span>
                    <p class="p-tip">变速箱：自动</p>
                </li>
                <li>
                        <span>
                            <img src="../images/涡轮增压.png">
                        </span>
                    <p class="p-tip">汽车：涡轮增压</p>
                </li>
                <li>
                        <span>
                            <img src="../images/油箱.png">
                        </span>
                    <p class="p-tip">油箱容量：50</p>
                </li>
            </ul>
        </div>
        <div class="current-carintro">
            <h3>车辆颜色说明</h3>
            <p>车辆颜色请以门店为准，图片仅为车型示意图。</p>
        </div>
    </div>
</div>

<!-- 行无忧 -->
<div class="hide">
    <div class="hwy_detail">
        <div>
            <div class="detail_title">
                <span>行无忧</span>
            </div>
            <a class="btn_close" href="#">
                <span></span>
            </a>
        </div>
        <div>
            <p class="p-tip">
                <span style="color:crimson;">•&nbsp;</span>
                <span>代缴不扣分违章罚款</span>
            </p>
            <p class="p-tip">
                <span style="color:rgb(233, 177, 89);">温馨提示：</span>
                <span>抵扣违章罚款及代办服务费用，每笔订单上限600元；交通违章仅指电子警察及贴条违章，不含扣分的违章、现场罚单及裁决罚单。鉴于以往的用车表现，购买行无忧可能会存在阶梯优惠及价格浮动，本项服务以订单实际页面显示价格为准。​</span>
            </p>
        </div>
        <div class="service-btn">
            <a  class="butn" href="#">我知道了</a>
        </div>
    </div>
</div>

<script>
    loadInitalData();

    //加载用户
    function loadInitalData(){

        var token = localStorage.getItem("token");
        console.log("token-----:"+token)

        $.ajax({
            type: "get",
            url: "${pageContext.request.contextPath}/customer/personalData",
            headers: {"token": token},
            success: function (result) {
                console.log(result);
                var loginUser = result.data.loginCustomer;

                if(loginUser != null) {
                    $(".head-color").text(loginUser.custName);
                    $(".head-color").attr("href", "${pageContext.request.contextPath}/customer/getId/" + loginUser.custId);
                    $(".crumbs-person").attr("href","${pageContext.request.contextPath}/customer/getId/" + loginUser.custId);
                    $(".orderCustId").attr("value",loginUser.custId)
                }else{
                    console.log("用户未登录！")
                    $(".head-color").text("登录");
                    $(".head-color").attr("href", "login/login.jsp");
                }
            }
        })

        //加载可用优惠卷
        $.ajax({
            type: "get",
            url: "${pageContext.request.contextPath}/customercoupon/couponList",
            headers: {"token": token},
            success: function (result) {
                console.log("获得优惠列表")
                var customerCouponList = result.data;

                if(customerCouponList != null) {
                    console.log("优惠列表不为空")

                    for (var i = 0;i<customerCouponList.length;i++) {
                        var  coupon = customerCouponList[i];

                        var ele = "<div class=\"discountcode-box\">\n" +
                            "<div class=\"discountcode-intro discountcode-usable\" id=\""+coupon.couponNo+"\" title=\"" + coupon.couponName + "\">\n" +
                            "<div class=\"discountcode-info\">\n" +
                            "<div class=\"discountcode-price\"><em>￥</em><span class=\"yhFree\">" + 100 + "</span></div>\n" +
                            "<div class=\"discountcode-validity\">有效期至" + coupon.couponExpiryTime + "</div>\n" +
                            "</div>\n" +
                            "<div class=\"discountcode-title\" >" + coupon.couponName + "</div>\n" +
                            "</div>\n" +
                            "</div>\n"

                        $("#promotioncodediv").append(ele);

                    }
                    //选中优惠卷
                    $(".discountcode-intro").click(function(){
                        if ($(this).hasClass("discountcode-usable")) {
                            $(this).addClass("discountcode-select").removeClass("discountcode-usable").children(".discountcode-title").addClass("discountcode-icons");
                            $(this).parent().siblings().children(".discountcode-select").addClass("discountcode-usable").removeClass("discountcode-select").children(".discountcode-title")
                                .removeClass("discountcode-icons");

                        }

                        //优惠减免

                        var yhCheck = document.querySelector(".discountcode-select");
                        // console.log(yhCheck)
                        yhName = yhCheck.getAttribute("title");
                        console.log("yhName: "+yhName)
                        yhFree = document.querySelector(".discountcode-select .yhFree").innerText;

                        $(".couponFree").attr("value",yhFree)
                        var couponNo = document.querySelector(".discountcode-select").id
                        $(".couponChecked").attr("value",couponNo)
                        console.log("couponNo:"+couponNo)
                        console.log("yhFree: "+ yhFree)

                        zongjia();
                    })

                }else{
                    console.log("优惠列表为空！")
                }
            }
        })
    }
</script>

<script src="${pageContext.request.contextPath}/js/myOrder_submit.js"></script>

</body>
</html>